var App;
//App = angular.module('App', ['ngRoute', 'angularFileUpload', 'dialogs', 'xeditable', 'ui.bootstrap', 'ui.utils',
//        'ui.select2', 'ex.filters',  'highcharts-ng','ngAnimate','ajoslin.promise-tracker','cgBusy','tableSort',
//        'smartTable.table', 'ui.tinymce', 'ui.router']);
App = angular.module('App', ['ngRoute','ui.bootstrap','dialogs','xeditable', 'highcharts-ng','ngAnimate','ui.router']);

App.config(function($interpolateProvider) {
    $interpolateProvider.startSymbol('{[');
    $interpolateProvider.endSymbol(']}');
});

App.config(
    [ '$stateProvider', '$urlRouterProvider',
        function ($stateProvider, $urlRouterProvider) {
            $urlRouterProvider.otherwise('/');
            $stateProvider
                .state("vector", {
                    url: "/vector",
                    templateUrl: '/static/js/views/list/vector.html',
                    controller:'VectorListCtrl'
                })
                .state("home", {
                    url: "/",
                    resolve:{
                        resolveData:['$http',function($http){
                           return $http.get('/api/v1/other/summary/').then(function(data){
                               return data.data;
                           });
                        }]
                    },
                    templateUrl: '/static/js/views/common/home.html',
                    controller:'HomeCtrl'
                })
        }
    ]
);
//
//App.run(function (editableOptions, editableThemes) {
//    editableThemes.bs3.inputClass = 'input-sm';
//    editableThemes.bs3.buttonsClass = 'btn-sm';
//    editableOptions.theme = 'bs3'; // bootstrap3 theme. Can be also 'bs2', 'default'
//});
//
//App.run(function (datepickerConfig) {
//    datepickerConfig.showWeeks = false;
//    datepickerConfig.startingDay = 0;
//    datepickerConfig.min = null;
//    datepickerConfig.max = null;
//    datepickerConfig.dateDisabled = null;
//    datepickerConfig.dayFormat = 'dd';
//    datepickerConfig.monthFormat = 'MM';
//    datepickerConfig.yearFormat = 'yyyy';
//    datepickerConfig.yearRange = 20;
//    datepickerConfig.dayHeaderFormat = 'EEE';
//    datepickerConfig.dayTitleFormat = 'yyyy年MM月';
//    datepickerConfig.monthTitleFormat = 'yyyy年';
//});
//
//App.run(function (datepickerPopupConfig) {
//    datepickerPopupConfig.datepickerPopup = 'yyyy-MM-dd';
//    datepickerPopupConfig.closeText = '关闭';
//    datepickerPopupConfig.clearText = '清除';
//    datepickerPopupConfig.toggleWeeksText = '周';
//    datepickerPopupConfig.currentText = '今天';
//    datepickerPopupConfig.showButtonBar = true;
//    datepickerPopupConfig.closeOnDateSelection = true;
//    datepickerPopupConfig.appendToBody = false;
//});
//
//App.run(function (paginationConfig) {
//    paginationConfig.itemsPerPage = 20;
//    paginationConfig.maxSize = null;
//    paginationConfig.rotate = true;
//    paginationConfig.directionLinks = true;
//    paginationConfig.previousText = '上一页';
//    paginationConfig.nextText = '下一页';
//    paginationConfig.boundaryLinks = false;
//    paginationConfig.firstText = '第一页';
//    paginationConfig.lastText = '最后页';
//});
//
//App.run(function (pagerConfig) {
//    pagerConfig.align = true;
//    pagerConfig.previousText = '上一页';
//    pagerConfig.nextText = '下一页';
//});
//
//App.run(function (timepickerConfig) {
//    timepickerConfig.hourStep = 1;
//    timepickerConfig.minuteStep = 1;
//    timepickerConfig.showMeridian = false;
//    timepickerConfig.meridians = null;
//    timepickerConfig.readonlyInput = false;
//    timepickerConfig.mousewheel = true;
//});
//
//
//App.config(['$httpProvider', function ($httpProvider) {
//    $httpProvider.defaults.headers.common['Authorization'] = 'Token {{user.api_key}}';
//    $httpProvider.defaults.xsrfCookieName = 'csrftoken';
//    $httpProvider.defaults.xsrfHeaderName = 'X-CSRFToken';
//}]);
//
//App.value('cgBusyTemplateName','/static/bower_components/angular-busy/angular-busy.html');
//
//
//
//


